
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>

int main(int argc, const char *argv[])
{
	int fd;
	const char *filename;

	if (argc < 2) {
        printf("Usage: %s filename\n", argv[0]);
		return -1;
    }

	filename = argv[1];

	fd = open(filename, O_RDWR, 0666);

	if (fd >= 0) {
		close(fd);
	}

	return 0;
}
